package com.usian.behavior.controller;

import com.usian.behavior.service.ApBehaviorEntryService;
import com.usian.model.behavior.pojos.ApBehaviorEntry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:
 * @Auther:ASS
 * @Date:2023/3/2 19:00
 */
@RestController
@RequestMapping("/api/v1/entry")
public class ApBehaviorEntryController{

    @Autowired
    private ApBehaviorEntryService apBehaviorEntryService;


    /**
     * article 远程调用提供查询用户行为实体接口
     * @param userId
     * @param equipmentId
     * @return
     */
    @GetMapping("/find/{userId}/{equipmentId}")
    public ApBehaviorEntry findByUserIdOrEquipmentId(@PathVariable("userId") Integer userId,
                                                     @PathVariable("equipmentId") Integer equipmentId) {

        return apBehaviorEntryService.findByUserIdOrEquipmentId(userId,equipmentId);
    }
}
